package observer.myObserve;

public class WeatherDate implements Observer{
    private Subject subject;

    public WeatherDate(Subject subject) {
        this.subject = subject;
        this.subject.addObserver(this);
    }

    @Override
    public void update(Integer temperature, Integer pressure, String reminderMessage) {
        System.out.println("今天的温度: " + temperature +" 度");
        System.out.println("今天的气压: " + pressure +" 帕");
        System.out.println(reminderMessage);
    }
}
